import { defineStore } from "pinia"

const useUserStore = defineStore('user', {
  state: (): { activeTab: number} => {
    return {
      activeTab: 0 //默认选中的索引
    }
  },
  actions: {
    // 设置active的值
    setActive(active: number): void {
      this.activeTab = active
    }
  }
})

export default useUserStore